package com.zzyl.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.zzyl.base.PageResponse;
import com.zzyl.mapper.CusProjectMapper;
import com.zzyl.service.CustomerProjectService;
import com.zzyl.vo.NursingProjectVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class CustomerProjectServiceimpl implements CustomerProjectService {
    @Autowired
    private CusProjectMapper cusProjectMapper;

    @Override
    public PageResponse<NursingProjectVo> getProjectPage(Integer pageNum, Integer pageSize, String name, Integer status) {
        PageHelper.startPage(pageNum, pageSize);
        Page<NursingProjectVo> nursingProjectVos  = cusProjectMapper.getPage(name,status);
        return PageResponse.of(nursingProjectVos,NursingProjectVo.class);
    }

    @Override
    public NursingProjectVo getById(Long id) {
        return cusProjectMapper.getById(id);
    }
}
